# 文件名: mcp
# 当前用户: shiping.zheng
# 当前日期: 2025/4/2
# 当前时间: 18:49
# 项目名称: Flag
"""
模块描述:
    
"""
import subprocess

try:
    # 使用你找到的 npx 路径
    npx_path = r"C:\Program Files\nodejs\npx.cmd"
    command = [npx_path, '@playwright/mcp@latest']
    result = subprocess.run(command, check=True, text=True, capture_output=True)
    print("安装成功:")
    print(result.stdout)
except subprocess.CalledProcessError as e:
    print(f"安装失败: {e.stderr}")